#include "stdafx.h"
#include "ProceedingJoinPoint.h"

int CProceedingJoinPoint::Invoke(int stackSize)
{
	char* espPointer = NULL;
	__asm mov espPointer,esp;
	for(int i=1;i<=stackSize;i++)
	{
		int value = (int)parametersStack[sizeof(int)*(stackSize-i)];
		__asm push value;
	}
	CAspectorObject* pObjectTemp = this->pObject;
	__asm push pObjectTemp;
	VFuncType vFunc = vtlb->VFuncs[vtlbIndex];
	__asm call vFunc;
	__asm mov esp,espPointer;
	int returnValue = 0;
	__asm mov returnValue, eax;
	return returnValue;
}